package jpa.entitys.promis.construction;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the VW_SYNC_CONTRACTS database table.
 * 
 */
@Entity
@Table(name="VW_SYNC_CONTRACTS")
@NamedQueries({
    @NamedQuery(name = "VwSyncContract.findAll", query = " SELECT c FROM VwSyncContract c  order by c.company,c.project,c.documentNo,c.subStatus,c.unitNumber,c.installmentNumber asc"),
    @NamedQuery(name = "VwSyncContract.findById", query = " SELECT c FROM VwSyncContract c WHERE c.costContractInstId = :Id "),
    @NamedQuery(name = "VwSyncContract.findByPoContractorStatus", query = " SELECT c FROM VwSyncContract c WHERE c.subStatus = :status And c.syncIsstaging = :syncIsstaging  order by c.company,c.project,c.documentNo,c.subStatus,c.unitNumber,c.installmentNumber asc"),
    @NamedQuery(name = "VwSyncContract.findByDocumentNo", query = " SELECT c FROM VwSyncContract c WHERE c.company = :company  And  c.project = :project And c.documentNo = :documentNo And c.subStatus = :subStatus And c.syncIsstaging = :syncIsstaging order by c.company,c.project,c.documentNo,c.subStatus,c.unitNumber,c.installmentNumber asc"),
    @NamedQuery(name = "VwSyncContract.findByDocumentNoWhtout", query = " SELECT c FROM VwSyncContract c WHERE c.company = :company  And  c.project = :project And c.documentNo = :documentNo And c.subStatus = :subStatus  order by c.company,c.project,c.documentNo,c.subStatus,c.unitNumber,c.installmentNumber asc"),
    @NamedQuery(name = "VwSyncContract.findByDocumentNoWhtout1", query = " SELECT c FROM VwSyncContract c WHERE c.company = :company  And  c.project = :project And c.documentNo = :documentNo order by c.company, c.project, c.documentNo, c.subStatus, c.unitNumber, c.installmentNumber asc")
})
public class VwSyncContract extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="COST_CONTRACT_INST_ID")
	private String costContractInstId;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}
	
	@Column(name="BUILDING_PHASE")
	private String buildingPhase;

	@Column(nullable=false)
	private String company;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CONTRACT_DATE")
	private Date contractDate;

	@Column(name="CONTRACT_GUARANTEE_AMOUNT")
	private BigDecimal contractGuaranteeAmount;

	@Column(name="CONTRACT_GUARANTEE_PERCENT")
	private BigDecimal contractGuaranteePercent;

	@Column(name="CONTRACT_NO")
	private String contractNo;

	@Column(name="COST_CONTRACT_DETAILS_ID")
	private String costContractDetailsId;	

	@Column(name="COST_CONTRACTS_ID")
	private String costContractsId;

	@Column(name="CREATED_BY")
	private String createdBy;

	@Column(name="CREATED_BY_NAME")
	private String createdByName;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	private String currency;
	
	private String description;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="DOC_DATE")
	private Date docDate;

	@Column(name="DOC_NO")
	private long docNo;

	@Column(name="DOC_SERIES")
	private String docSeries;

	@Column(name="DOC_TYPE")
	private String docType;

	@Column(name="DOCUMENT_NO")
	private String documentNo;

	@Column(name="INSTALLMENT_AMOUNT")
	private BigDecimal installmentAmount;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="INSTALLMENT_DUE_DATE")
	private Date installmentDueDate;

	@Column(name="INSTALLMENT_NUMBER")
	private BigDecimal installmentNumber;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

	@Column(name="LAST_UPD_BY_NAME")
	private String lastUpdByName;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="MODEL_DESC")
	private String modelDesc;

	@Column(name="MODEL_REVISION")
	private BigDecimal modelRevision;

	@Column(name="NET_AMOUNT_LC")
	private BigDecimal netAmountLc;

	@Column(name="PN_PERDAY")
	private BigDecimal pnPerday;

	@Column(nullable=false)
	private String project;

	@Column(name="RETENTION_AMOUNT")
	private BigDecimal retentionAmount;

	@Column(name="RETENTION_PERCENT")
	private BigDecimal retentionPercent;

	@Column(name="SAP_COMPANY_CODE")
	private String sapCompanyCode;

	@Column(name="SAP_PLANT_CODE")
	private String sapPlantCode;

	@Column(name="SUB_STATUS")
	private String subStatus;
	
	@Column(name="ITEM_STATUS")
	private String itemStatus;	

	@Column(name="SUPPLIER_CODE")
	private String supplierCode;

	@Column(name="SYNC_CREATEDBY")
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY")
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO")
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING")
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC")
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY")
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TAX_CODE")
	private String taxCode;

	@Column(name="TOTAL_COST")
	private BigDecimal totalCost;

	@Column(name="TOTAL_COST_BF_VAT")
	private BigDecimal totalCostBfVat;

	@Column(name="TOTAL_VAT")
	private BigDecimal totalVat;

	@Column(name="UNIT_NUMBER")
	private String unitNumber;

	@Column(name="ZONE_CODE")
	private String zoneCode;
	
	@Column(name="PROPERTY_CATEGORY")
	private String propertyCategory;
	
	@Column(name="TYPE_OF_VARIATION")
	private String typeOfVariation;
	
	@Column(name="SEQ")
	private Long seq;
	
	@Column(name="STATUS")
	private String status;
	
	@Column(name="INSTALLMENT_NO_STR")
	private String installmentNoStr;	

    /**
	 * @return the installmentNoStr
	 */
	public String getInstallmentNoStr() {
		return installmentNoStr;
	}

	/**
	 * @param installmentNoStr the installmentNoStr to set
	 */
	public void setInstallmentNoStr(String installmentNoStr) {
		this.installmentNoStr = installmentNoStr;
	}

	/**
	 * @return the itemStatus
	 */
	public String getItemStatus() {
		return itemStatus;
	}

	/**
	 * @param itemStatus the itemStatus to set
	 */
	public void setItemStatus(String itemStatus) {
		this.itemStatus = itemStatus;
	}

	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @return the seq
	 */
	public Long getSeq() {
		return seq;
	}

	/**
	 * @param seq the seq to set
	 */
	public void setSeq(Long seq) {
		this.seq = seq;
	}

	/**
	 * @return the typeOfVariation
	 */
	public String getTypeOfVariation() {
		return typeOfVariation;
	}

	/**
	 * @param typeOfVariation the typeOfVariation to set
	 */
	public void setTypeOfVariation(String typeOfVariation) {
		this.typeOfVariation = typeOfVariation;
	}

	/**
	 * @return the propertyCategory
	 */
	public String getPropertyCategory() {
		return propertyCategory;
	}

	/**
	 * @param propertyCategory the propertyCategory to set
	 */
	public void setPropertyCategory(String propertyCategory) {
		this.propertyCategory = propertyCategory;
	}

	public VwSyncContract() {
    }

	public String getBuildingPhase() {
		return this.buildingPhase;
	}

	public void setBuildingPhase(String buildingPhase) {
		this.buildingPhase = buildingPhase;
	}

	public String getCompany() {
		return this.company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public Date getContractDate() {
		return this.contractDate;
	}

	public void setContractDate(Date contractDate) {
		this.contractDate = contractDate;
	}

	public BigDecimal getContractGuaranteeAmount() {
		return this.contractGuaranteeAmount;
	}

	public void setContractGuaranteeAmount(BigDecimal contractGuaranteeAmount) {
		this.contractGuaranteeAmount = contractGuaranteeAmount;
	}

	public BigDecimal getContractGuaranteePercent() {
		return this.contractGuaranteePercent;
	}

	public void setContractGuaranteePercent(BigDecimal contractGuaranteePercent) {
		this.contractGuaranteePercent = contractGuaranteePercent;
	}

	public String getContractNo() {
		return this.contractNo;
	}

	public void setContractNo(String contractNo) {
		this.contractNo = contractNo;
	}

	public String getCostContractDetailsId() {
		return this.costContractDetailsId;
	}

	public void setCostContractDetailsId(String costContractDetailsId) {
		this.costContractDetailsId = costContractDetailsId;
	}

	public String getCostContractInstId() {
		return this.costContractInstId;
	}

	public void setCostContractInstId(String costContractInstId) {
		this.costContractInstId = costContractInstId;
	}

	public String getCostContractsId() {
		return this.costContractsId;
	}

	public void setCostContractsId(String costContractsId) {
		this.costContractsId = costContractsId;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getCreatedByName() {
		return this.createdByName;
	}

	public void setCreatedByName(String createdByName) {
		this.createdByName = createdByName;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getDocDate() {
		return this.docDate;
	}

	public void setDocDate(Date docDate) {
		this.docDate = docDate;
	}

	public long getDocNo() {
		return this.docNo;
	}

	public void setDocNo(long docNo) {
		this.docNo = docNo;
	}

	public String getDocSeries() {
		return this.docSeries;
	}

	public void setDocSeries(String docSeries) {
		this.docSeries = docSeries;
	}

	public String getDocType() {
		return this.docType;
	}

	public void setDocType(String docType) {
		this.docType = docType;
	}

	public String getDocumentNo() {
		return this.documentNo;
	}

	public void setDocumentNo(String documentNo) {
		this.documentNo = documentNo;
	}

	public BigDecimal getInstallmentAmount() {
		return this.installmentAmount;
	}

	public void setInstallmentAmount(BigDecimal installmentAmount) {
		this.installmentAmount = installmentAmount;
	}

	public Date getInstallmentDueDate() {
		return this.installmentDueDate;
	}

	public void setInstallmentDueDate(Date installmentDueDate) {
		this.installmentDueDate = installmentDueDate;
	}

	public BigDecimal getInstallmentNumber() {
		return this.installmentNumber;
	}

	public void setInstallmentNumber(BigDecimal installmentNumber) {
		this.installmentNumber = installmentNumber;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public String getLastUpdByName() {
		return this.lastUpdByName;
	}

	public void setLastUpdByName(String lastUpdByName) {
		this.lastUpdByName = lastUpdByName;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public String getModelDesc() {
		return this.modelDesc;
	}

	public void setModelDesc(String modelDesc) {
		this.modelDesc = modelDesc;
	}

	public BigDecimal getModelRevision() {
		return this.modelRevision;
	}

	public void setModelRevision(BigDecimal modelRevision) {
		this.modelRevision = modelRevision;
	}

	public BigDecimal getNetAmountLc() {
		return this.netAmountLc;
	}

	public void setNetAmountLc(BigDecimal netAmountLc) {
		this.netAmountLc = netAmountLc;
	}

	public BigDecimal getPnPerday() {
		return this.pnPerday;
	}

	public void setPnPerday(BigDecimal pnPerday) {
		this.pnPerday = pnPerday;
	}

	public String getProject() {
		return this.project;
	}

	public void setProject(String project) {
		this.project = project;
	}

	public BigDecimal getRetentionAmount() {
		return this.retentionAmount;
	}

	public void setRetentionAmount(BigDecimal retentionAmount) {
		this.retentionAmount = retentionAmount;
	}

	public BigDecimal getRetentionPercent() {
		return this.retentionPercent;
	}

	public void setRetentionPercent(BigDecimal retentionPercent) {
		this.retentionPercent = retentionPercent;
	}

	public String getSapCompanyCode() {
		return this.sapCompanyCode;
	}

	public void setSapCompanyCode(String sapCompanyCode) {
		this.sapCompanyCode = sapCompanyCode;
	}

	public String getSapPlantCode() {
		return this.sapPlantCode;
	}

	public void setSapPlantCode(String sapPlantCode) {
		this.sapPlantCode = sapPlantCode;
	}

	

	/**
	 * @return the subStatus
	 */
	public String getSubStatus() {
		return subStatus;
	}

	/**
	 * @param subStatus the subStatus to set
	 */
	public void setSubStatus(String subStatus) {
		this.subStatus = subStatus;
	}

	public String getSupplierCode() {
		return this.supplierCode;
	}

	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getTaxCode() {
		return this.taxCode;
	}

	public void setTaxCode(String taxCode) {
		this.taxCode = taxCode;
	}

	public BigDecimal getTotalCost() {
		return this.totalCost;
	}

	public void setTotalCost(BigDecimal totalCost) {
		this.totalCost = totalCost;
	}

	public BigDecimal getTotalCostBfVat() {
		return this.totalCostBfVat;
	}

	public void setTotalCostBfVat(BigDecimal totalCostBfVat) {
		this.totalCostBfVat = totalCostBfVat;
	}

	public BigDecimal getTotalVat() {
		return this.totalVat;
	}

	public void setTotalVat(BigDecimal totalVat) {
		this.totalVat = totalVat;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public String getZoneCode() {
		return this.zoneCode;
	}

	public void setZoneCode(String zoneCode) {
		this.zoneCode = zoneCode;
	}

}